const path = require("path");
const {
  disableEsLint,
  addDecoratorsLegacy,
  override,
  fixBabelImports,
} = require("customize-cra");
//目录映射
const customize = () => (config, env) => {
  config.resolve.alias["@"] = path.join(__dirname, "src");
  return config;
};
//配置项  覆盖webpack某些配置
module.exports = override(
  disableEsLint(), //eslint
  addDecoratorsLegacy(), //开启装饰器
  customize(), //启用地址映射
  fixBabelImports("import", {
    libraryName: "antd-mobile",
    style: "css",
  })
);
